/*****************************************************************
 Naicigam Engine v0.1

 File: Timer.h
 Created: 22/04/08
*****************************************************************/

//----------------------------------------------------------------
#ifndef TIMER_H
#define TIMER_H
//----------------------------------------------------------------
#include <windows.h>
#include "system/System.h"
//----------------------------------------------------------------
namespace leo
{
//----------------------------------------------------------------
class LEO_API Timer
{
// constructor / destructor
public:
	Timer ();
	~Timer ();

// measure
public:
	void firstMeasure ();
	void measure ();

// accessors
public:
	float getTimeBetweenFrames () const;
	unsigned int getFPS () const;


private:
	double TimeBetweenFrames;
	double MeasureFpsSample;
	unsigned int FPS;
	unsigned int FrameCounter;

	LARGE_INTEGER PerfCount1;
	LARGE_INTEGER PerfCount2;
	LARGE_INTEGER Frequency;
};
//----------------------------------------------------------------
#include "Timer.inl"
//----------------------------------------------------------------
} // end namespace
//----------------------------------------------------------------
#endif // TIMER_H
//----------------------------------------------------------------